<!--
 * @Author: 胡海
 * @Date: 2020-11-14 13:12:26
 * @LastEditors: 胡海
 * @LastEditTime: 2020-11-17 19:22:07
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>es的解构赋值</title>
</head>
<body>
    <script>
        /*let arr = [1,2,3,4];
        var [a,b,c,d,e='默认值'] = [1,2,3,5];
        console.log(d);
        console.log(e);

        var miaov = {
            fn:function(){},
            add: function(){alert(1)},
            iSFunction: function(){},
        }*/
        /*miaov.fn()
        miaov.add()*/
      /*  let {add,iSFunction,iSArray=function(){}} = miaov;
        console.log(add);
        console.log(iSFunction);
        console.log(iSArray);*/
       /*function fn({a,b,c,d='get'}){
           console.log(a);
           console.log(b);
           console.log(c);
           console.log(d);
       }
       fn({
           a:1,
           b:2,
           c:3,
           d:'post'
       })*/
       var miaov = 'ketang'
        let str2 = `
        <ul>
            <li>${miaov}</li>
            <li>${1+1}</li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
        `
        //不能在中间写语句，比如if 可以写表达式
         console.log(str2);

    </script>
</body>
</html>